package com.dongjiantong.quarantine.enums;

/**
 * Created by mz on 16/1/18.
 *
 */
public enum HarmlessFormsType {
    QUARANTINE_ORIGIN_AREA(1,"产地检疫"),
    ADMISSION_INSPECTION_NON_LOCAL(2,"外地入场监督检查"),
    ADMISSION_INSPECTION_LOCAL(3,"本市入场监督检查"),
    ANTEMORTEM_INSPECTION(4,"屠宰检疫-宰前检查"),
    SYNCHRONOUS_INSPECTION(5,"屠宰检疫-同步检疫"),
    QUARANTINE_CENTER_HARMLESS(6,"防疫中心-无害化");

    private final Integer value;

    private final String description;

    HarmlessFormsType(int value, String description) {
        this.value = value;
        this.description = description;
    }
    public static HarmlessFormsType from(Integer value) {
        for (HarmlessFormsType harmlessFormsType : HarmlessFormsType.values()) {
            if (harmlessFormsType.value.equals(value)) {
                return harmlessFormsType;
            }
        }
        return null;
    }

    public Integer value() {
        return this.value;
    }

    @Override
    public String toString() {
        return description;
    }
}
